<style>
    label {
        display: block;
    }
</style>
<div class="error"><?= $error ?></div>
<form action="" method="post">
    <div><label>密码:</label><input type="password" name="password"></div>
    <div><button type="submit">登录</button></div>
</form>